﻿using Xunit;

namespace dogd.Tests
{
	public class OrderByFacts
	{
		public class TheToStringMethod
		{
			[Fact]
			public void ReturnsColumnNameAndAscendingKeyword()
			{
				var order = new OrderBy("Length", SortOrder.Ascending);

				Assert.Equal("ORDER BY Length ASC", order.ToString());
			}

			[Fact]
			public void ReturnsColumnNameAndDescendingKeyword()
			{
				var order = new OrderBy("Date", SortOrder.Descending);

				Assert.Equal("ORDER BY Date DESC", order.ToString());
			}
		}
	}
}
